<template>
  <div>
    <button @click="bool = !bool">点击</button>
    <h1 v-show="bool">我是 v-show</h1>
    <h1 v-if="bool">我是 v-if</h1>
  </div>
</template>

<script>
export default {
  data() {
    return {
      bool: false,
    };
  },

  methods: {},
};
</script>

<style>
h1 {
  width: 200px;
  height: 200px;
  background-color: #0f0;
}
</style>